<?php
include("./PDO/PdoAdmin.php"); //On inclut les fonctions PDO (create / update etc...)
include("./class/Admin.php"); //On inclut les fonctions PDO (create / update etc...)
?>
<h1>Nos Archives</h1>
<div id="news">
    <table>
        <tr>
            <td>Date</td>
            <td>Titre</td>
            <td>Auteur</td>
        </tr>

        <?php
        foreach ($lesNews as $unenews) {

            $IdAdmin = $unenews["IDADMIN"];
            $admin = new PdoAdmin();
            $admin = $admin->readOne($IdAdmin);


            echo'<tr>';
            echo'<td>';
            echo $unenews["DATENEWS"];
            echo '</td>';
            echo '<td>';
            echo '<a href="index.php?route=accueil&action=readOne&IdNews=' . $unenews["IDNEWS"] . '">';
            echo $unenews["TITRENEWS"];
            echo '</a>';
            echo '</td>';
            echo'<td>';
            echo $admin->getPseudoAdmin();
            echo '</td>';
            echo'</tr>';
        }
        ?>
    </table>
</div>
